<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Stu {
            constructor(name) {
                this.name = name
            }
            say() {
                console.log("说谎");
            }
        }
        class Man extends Stu {
            constructor(name) {
                super(name);
                this.sex="女"
            }
        }
        let a = new Man("王")
        console.log(a);
        a.say()
    </script>
</body>
</html>